feat: hawk-core-contracts architecture and ecosystem boundary enforcement#66
Merged
Conversation
Add the hawk-core-contracts module to the local workspace and migrate Hawk runtime, session, policy, event, review, and verification boundaries to consume neutral contracts instead of leaking Hawk internals or eyrie/client types. Also add import guardrails, architecture docs, and the sight/inspect submodule adapter commits required by the Hawk bridge layer.
…ality The contracts architecture docs described an aspirational state that did not match the implemented module. Bring them in sync with the code: - dependency-rules: split the required graph (always-true edges) from contract edges. Document that an engine depends on hawk-core-contracts only when it produces/consumes a cross-repo contract. Reflect actual state: sight, inspect, and tok consume contracts; eyrie, yaad, and trace share no cross-repo types and stay contract-free. Mark enforcement (boundary guards in CI) as done and record open items (unpublished v0.0.0 module, rg dependency in guards). - contracts-spec: drop the non-existent `engines/` and `sessions/` packages from the "present" layout (kept as explicitly planned), and replace the aspirational type list with the contracts that actually exist per package. - migration backlog: record removal of the duplicate tok/types definitions.
Match the established ecosystem binding (eyrie/sight/etc.): require the module by published version and keep the local redirect in go.work, not go.mod. - go.mod: require hawk-core-contracts v0.1.0 (was v0.0.0), drop the `replace => ./external/hawk-core-contracts` - go.work: move hawk-core-contracts into the replace block alongside the other engines (was a stray `use` directive) Local builds resolve via go.work -> ./external/hawk-core-contracts; CI will resolve the published v0.1.0 once the module is tagged. Matches eyrie exactly.
Update architecture.md to reflect the finished contracts migration and pin the external hawk-core-contracts checkout to the refreshed README.
Document the shipping bar for the contracts-and-boundaries refactor, including explicit non-goals and post-v1 contract governance rules.
…, not engine mains
- FromClientStreamResult: add context.WithCancel + select so goroutine unblocks and exits when Close() is called instead of blocking forever - session.Message: add Thinking, ContentParts, Images fields so save/restore no longer silently drops extended-thinking and multimodal data; update both conversion functions to map them - ci: move check-support-repo-coupling.sh from format job (no external repos present) to vet job (has checkout-eyrie) so the guard actually runs against the ecosystem
Patel230
added a commit
that referenced
this pull request
Jul 11, 2026
…ment (#66) * feat: implement core contracts architecture Add the hawk-core-contracts module to the local workspace and migrate Hawk runtime, session, policy, event, review, and verification boundaries to consume neutral contracts instead of leaking Hawk internals or eyrie/client types. Also add import guardrails, architecture docs, and the sight/inspect submodule adapter commits required by the Hawk bridge layer. * docs(architecture): align contracts spec and dependency rules with reality The contracts architecture docs described an aspirational state that did not match the implemented module. Bring them in sync with the code: - dependency-rules: split the required graph (always-true edges) from contract edges. Document that an engine depends on hawk-core-contracts only when it produces/consumes a cross-repo contract. Reflect actual state: sight, inspect, and tok consume contracts; eyrie, yaad, and trace share no cross-repo types and stay contract-free. Mark enforcement (boundary guards in CI) as done and record open items (unpublished v0.0.0 module, rg dependency in guards). - contracts-spec: drop the non-existent `engines/` and `sessions/` packages from the "present" layout (kept as explicitly planned), and replace the aspirational type list with the contracts that actually exist per package. - migration backlog: record removal of the duplicate tok/types definitions. * build(contracts): bind hawk-core-contracts like every other engine Match the established ecosystem binding (eyrie/sight/etc.): require the module by published version and keep the local redirect in go.work, not go.mod. - go.mod: require hawk-core-contracts v0.1.0 (was v0.0.0), drop the `replace => ./external/hawk-core-contracts` - go.work: move hawk-core-contracts into the replace block alongside the other engines (was a stray `use` directive) Local builds resolve via go.work -> ./external/hawk-core-contracts; CI will resolve the published v0.1.0 once the module is tagged. Matches eyrie exactly. * feat: enforce peer-isolated hawk architecture * docs: add consolidated hawk repo architecture map * docs: add hawk ecosystem summary * fix: harden hawk tool and daemon guardrails * fix: harden plugin clone and cover persistence deadlock * docs: define shared types retirement gate * refactor: remove legacy shared types shim * docs: mark hawk-core-contracts as the completed shared types layer Update architecture.md to reflect the finished contracts migration and pin the external hawk-core-contracts checkout to the refreshed README. * docs(architecture): add realistic v1 definition of done Document the shipping bar for the contracts-and-boundaries refactor, including explicit non-goals and post-v1 contract governance rules. * docs(architecture): require human-only commit authorship in v1 bar * chore: bump external hawk-core-contracts after co-author cleanup * chore: align hawk external architecture snapshot * docs: retire tok types shim references * docs: normalize architecture status * docs: add upstream release convergence plan * fix(ci): align setup-deps go.work format and add hawk-core-contracts * fix(submodule): point hawk-core-contracts at published main SHA * docs: remove trailing blank lines (markdownlint MD012) * fix(docker): build against pinned submodules incl hawk-core-contracts, not engine mains * fix(submodules): refresh engine pins to current PR HEADs (unbreak orphaned trace SHA) * fix: stream leak, session data loss, and coupling guard in CI - FromClientStreamResult: add context.WithCancel + select so goroutine unblocks and exits when Close() is called instead of blocking forever - session.Message: add Thinking, ContentParts, Images fields so save/restore no longer silently drops extended-thinking and multimodal data; update both conversion functions to map them - ci: move check-support-repo-coupling.sh from format job (no external repos present) to vet job (has checkout-eyrie) so the guard actually runs against the ecosystem
Patel230
added a commit
that referenced
this pull request
Jul 16, 2026
…ment (#66) * feat: implement core contracts architecture Add the hawk-core-contracts module to the local workspace and migrate Hawk runtime, session, policy, event, review, and verification boundaries to consume neutral contracts instead of leaking Hawk internals or eyrie/client types. Also add import guardrails, architecture docs, and the sight/inspect submodule adapter commits required by the Hawk bridge layer. * docs(architecture): align contracts spec and dependency rules with reality The contracts architecture docs described an aspirational state that did not match the implemented module. Bring them in sync with the code: - dependency-rules: split the required graph (always-true edges) from contract edges. Document that an engine depends on hawk-core-contracts only when it produces/consumes a cross-repo contract. Reflect actual state: sight, inspect, and tok consume contracts; eyrie, yaad, and trace share no cross-repo types and stay contract-free. Mark enforcement (boundary guards in CI) as done and record open items (unpublished v0.0.0 module, rg dependency in guards). - contracts-spec: drop the non-existent `engines/` and `sessions/` packages from the "present" layout (kept as explicitly planned), and replace the aspirational type list with the contracts that actually exist per package. - migration backlog: record removal of the duplicate tok/types definitions. * build(contracts): bind hawk-core-contracts like every other engine Match the established ecosystem binding (eyrie/sight/etc.): require the module by published version and keep the local redirect in go.work, not go.mod. - go.mod: require hawk-core-contracts v0.1.0 (was v0.0.0), drop the `replace => ./external/hawk-core-contracts` - go.work: move hawk-core-contracts into the replace block alongside the other engines (was a stray `use` directive) Local builds resolve via go.work -> ./external/hawk-core-contracts; CI will resolve the published v0.1.0 once the module is tagged. Matches eyrie exactly. * feat: enforce peer-isolated hawk architecture * docs: add consolidated hawk repo architecture map * docs: add hawk ecosystem summary * fix: harden hawk tool and daemon guardrails * fix: harden plugin clone and cover persistence deadlock * docs: define shared types retirement gate * refactor: remove legacy shared types shim * docs: mark hawk-core-contracts as the completed shared types layer Update architecture.md to reflect the finished contracts migration and pin the external hawk-core-contracts checkout to the refreshed README. * docs(architecture): add realistic v1 definition of done Document the shipping bar for the contracts-and-boundaries refactor, including explicit non-goals and post-v1 contract governance rules. * docs(architecture): require human-only commit authorship in v1 bar * chore: bump external hawk-core-contracts after co-author cleanup * chore: align hawk external architecture snapshot * docs: retire tok types shim references * docs: normalize architecture status * docs: add upstream release convergence plan * fix(ci): align setup-deps go.work format and add hawk-core-contracts * fix(submodule): point hawk-core-contracts at published main SHA * docs: remove trailing blank lines (markdownlint MD012) * fix(docker): build against pinned submodules incl hawk-core-contracts, not engine mains * fix(submodules): refresh engine pins to current PR HEADs (unbreak orphaned trace SHA) * fix: stream leak, session data loss, and coupling guard in CI - FromClientStreamResult: add context.WithCancel + select so goroutine unblocks and exits when Close() is called instead of blocking forever - session.Message: add Thinking, ContentParts, Images fields so save/restore no longer silently drops extended-thinking and multimodal data; update both conversion functions to map them - ci: move check-support-repo-coupling.sh from format job (no external repos present) to vet job (has checkout-eyrie) so the guard actually runs against the ecosystem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hawk-core-contractsas the shared cross-repo API and remove the legacyhawk/shared/typespatheyrie/clientlimited to Hawk transport adapter edges with Hawk-owned runtime DTOsMerge order
Merge the support-engine and consumer boundary PRs first, then merge this Hawk integration PR.
Test plan
make ecosystem-guard contracts-guard eyrie-client-guard peer-guardgo test ./internal/testaudit/...external/*snapshot